package homework_01.home01;

public class homework01 {
    public static void main(String[] args) {
        int a = 1;
        int b = 2;
        int c = 0;
        c = a;
        a = b;
        b = c;
        System.out.println("交换后的ab值为：");
        System.out.println(a);
        System.out.println(b);
        System.out.println("***********方法二***********");
        int a1 = 1;
        int b1 = 2;
        a1 = a1 + b1;
        b1 = a1 - b1;
        a1 = a1 - b1;
        System.out.println(a1);
        System.out.println(b1);
    }
}